package com.example.springboot.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@ApiModel(value = "Patent对象", description = "")
public class Patent implements Serializable ,Comparable<Patent>{

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("申请/专利号")
      private String id;

      @ApiModelProperty("专利名称")
      private String name;

      @ApiModelProperty("专利摘要")
      @TableField(value = "abstract")
      private String content;

      @ApiModelProperty("专利类型")
      private String type;

      @ApiModelProperty("申请日期")
      private String sqrq;

      @ApiModelProperty("公开/公告日")
      private String gkr;

      @ApiModelProperty("公开/公告号")
      @TableId
      private String gkh;

      @ApiModelProperty("主分类号")
      private String zflh;

      @ApiModelProperty("分类号")
      private String flh;

      @ApiModelProperty("发明/设计人")
      private String fmr;

      @ApiModelProperty("专利代理机构")
      private String zldljg;

      @ApiModelProperty("代理人")
      private String dlr;

      @ApiModelProperty("国别省市代码")
      private String ssdm;

      @ApiModelProperty("主权项")
      private String zqx;

      @ApiModelProperty("法律状态")
      private String flzt;

      @ApiModelProperty("链接")
      private String url;

      @ApiModelProperty("领域")
      private String field;

      //权重
      @TableField(exist = false)
      private int weight;


      @Override
      public int compareTo(Patent patent) {           //重写Comparable接口的compareTo方法，
        return patent.getWeight() - this.weight ;      // 根据权重降序排列
    }

}
